﻿/*------------------------------------------------
// File Description: WorkOrderBinningSchema DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-06-07 23:49:52
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 工单分档规则
    /// </summary>
    [Table(nameof(WorkOrderBinningSchema))]
    public class WorkOrderBinningSchema : BaseEntity
    {
        private string _orderNo = string.Empty;
        private string _workOrderNo = string.Empty;
        private string _nameplateModel;

        #region Public Property

        ///<Summary>
        /// 订单号
        ///</Summary>
        public string OrderNo
        {
            get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
            set { _orderNo = value; }
        }

        ///<Summary>
        /// 工单号
        ///</Summary>
        public string WorkOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_workOrderNo) ? string.Empty : _workOrderNo; }
            set { _workOrderNo = value; }
        }

        ///<Summary>
        /// 分档规则ID
        ///</Summary>
        public int BinningSchemeId { get; set; }

        /// <summary>
        /// 功率档ID
        /// </summary>
        public int BinningPowerId { get; set; }

        /// <summary>
        /// 功率
        /// </summary>
        public decimal BinningPower { get; set; }

        /// <summary>
        /// 铭牌方案
        /// </summary>
        public string NameplateModel
        {
            get { return string.IsNullOrWhiteSpace(_nameplateModel) ? string.Empty : _nameplateModel; }
            set { _nameplateModel = value; }
        }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 工单分档规则
        /// </summary>
        public virtual DbSet<WorkOrderBinningSchema> WorkOrderBinningSchemas { get; set; }
    }
}